﻿<!DOCTYPE html>
<html>
<head>
    <title>CGI</title>
</head>
<body>
    <h1>Our Page</h1>
    <script>
        //01
        
        var dt = new Date();
        console.log(dt);

        var dt = new Date(0);
        console.log(dt);

        var dt = new Date('2/13/2015');
        console.log(dt);

        var dt = new Date('March 1,2015');
        console.log(dt);

        var dt = new Date('Hello CGI!');
        console.log(dt);
        

        //02
        /*
        //number of seconds since Jan 1 1970 till Jan 1 2000
        var dt = Date.UTC(2000, 0);
        console.log(dt);

        //number of seconds since Jan 1 1970 till right now
        var dt = Date.now();
        console.log(dt);
        */

        //03 Formatting date
        /*
        var dt = new Date();
        console.log(dt.toDateString());
        console.log(dt.toTimeString());
        console.log(dt.getFullYear());

        dt.setFullYear(2025);
        console.log(dt.getFullYear());
        */
    </script>
</body>
</html>